﻿using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Text;
using dwindleUrl.Models;
using dwindleUrl.Repositories;
using Microsoft.Practices.Prism.Commands;
using Microsoft.Practices.Prism.Mvvm.Interfaces;

namespace dwindleUrl.DesignTime
{
    public class MainPageViewModel : ViewModels.IMainPageViewModel
    {

        public ObservableCollection<Models.Item> Items { get; set; }
        public Models.Item Selected { get; set; }
        public DelegateCommand AboutCommand { get; set; }
        public DelegateCommand OpenCommand { get; set; }
        public int Value { get; set; }

        public MainPageViewModel()
        {
            var repository = new ItemRepository();
            this.Items = new ObservableCollection<Models.Item>();
            foreach (var item in repository.AllItems())
            {
                this.Items.Add(item);
            }
        }



        
    }
}
